package com.kkyy.findmusic.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.kkyy.findmusic.dao.MvsDao;
import com.kkyy.findmusic.entity.MvsEntity;
import com.kkyy.findmusic.service.MvsService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MvsServiceImpl extends ServiceImpl<MvsDao, MvsEntity> implements MvsService {
    @Override
    public List<MvsEntity> getMvs() {
        List<MvsEntity> mvs = this.baseMapper.selectByStatus();
        return mvs;
    }

    @Override
    public void delMvById(Integer id) {
        this.baseMapper.updateMvStatus(id);
    }

    @Override
    public void upMvById(Integer id) {
        baseMapper.updateMvType(id);
    }

    @Override
    public void downMvById(Integer id) {
        baseMapper.updateDownMvType(id);
    }

    @Override
    public List<MvsEntity> getMvs2() {
        List<MvsEntity> mvs = this.baseMapper.selectByStatus2();
        return mvs;
    }

    @Override
    public void addMvInfo(String picurl, Integer count, String mvreco, String mvart, String mvname, Integer location) {
        baseMapper.insertMvInfo(picurl, count, mvreco, mvart, mvname, location);
    }
}